static guint signals[LAST_SIGNAL] = { 0 };
-static gboolean test_touchscreen = FALSE;
G_DEFINE_TYPE_WITH_CODE (GtkTextView, gtk_text_view, GTK_TYPE_CONTAINER,
G_ADD_PRIVATE (GtkTextView)
GTK_TYPE_DIRECTION_TYPE, GTK_DIR_TAB_BACKWARD);
gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_TEXT_VIEW_ACCESSIBLE);
- test_touchscreen = g_getenv ("GTK_TEST_TOUCHSCREEN") != NULL;
quark_text_selection_data =
g_quark_from_static_string ("gtk-text-view-text-selection-data");
#endif
device = gdk_event_get_source_device ((GdkEvent *) event);
- is_touchscreen = test_touchscreen ||
- (gtk_get_debug_flags () & GTK_DEBUG_TOUCHSCREEN) != 0 ||
+ is_touchscreen = gtk_simulate_touchscreen () ||
gdk_device_get_source (device) == GDK_SOURCE_TOUCHSCREEN;
if (n_press == 1)
device = gdk_event_get_source_device (event);
- is_touchscreen = test_touchscreen ||
- (gtk_get_debug_flags () & GTK_DEBUG_TOUCHSCREEN) != 0 ||
+ is_touchscreen = gtk_simulate_touchscreen () ||
gdk_device_get_source (device) == GDK_SOURCE_TOUCHSCREEN;
get_iter_from_gesture (text_view, text_view->priv->drag_gesture,
event = gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence);
device = gdk_event_get_source_device (event);
- is_touchscreen = test_touchscreen ||
- (gtk_get_debug_flags () & GTK_DEBUG_TOUCHSCREEN) != 0 ||
+ is_touchscreen = gtk_simulate_touchscreen () ||
gdk_device_get_source (device) == GDK_SOURCE_TOUCHSCREEN;
if (!is_touchscreen && clicked_in_selection &&